package com.tmxk.api.days01.gull;

/**
 * @Description: TODO
 * @Author: gull
 * @CreateTime: 2022-11-28  13:58
 * @Version: 1.0
 */
public class Dog implements Comparable{
    private int id;
    private String name;
    private int age;
    private int health;
    private int love;
    private double weight;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getHealth() {
        return health;
    }

    public void setHealth(int health) {
        this.health = health;
    }

    public int getLove() {
        return love;
    }

    public void setLove(int love) {
        this.love = love;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Dog() {
    }

    public Dog(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public Dog(int id, String name, int age, int health, int love, double weight) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.health = health;
        this.love = love;
        this.weight = weight;
    }

    @Override
    public String toString() {
        return "Dog{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    @Override
    public int compareTo(Object o) {
        Dog dog = (Dog) o;
        return this.getAge() - dog.getAge();
    }
}
